package dao;

public class Test {

    private volatile static Integer a = null;

    public static Integer change() {
        if (a == null) {
            synchronized (Test.class) {
                if (a == null) {
                    a = 1;
                }
            }
        }
        return a;
    }


    public static void main(String[] args) {
        Integer a = Test.change();
        System.out.println(a);
    }
}
